package teamGiga.dao;

import java.util.List;

import teamGiga.bean.CartBean;
import teamGiga.bean.MovieBean;
import teamGiga.bean.ShoppingBean;

import com.ibatis.sqlmap.client.SqlMapClient;

public class CartDao {
	static SqlMapClient sqlMapper;
	static{
		sqlMapper = util.ServiceUtil.getSqlMapClient();
	}

	public static List<MovieBean>selectCart()throws Exception{
		return sqlMapper.queryForList("teamGiga.bean.cart.selectCart");
	}
	
	public static Object selectInfoMovie(int no)throws Exception{
		return sqlMapper.queryForObject("teamGiga.bean.cart.selectInfo", no);
		
	}
	
	public static Object selectpay(int rdate)throws Exception{
		return sqlMapper.queryForObject("teamGiga.bean.cart.selectpay",rdate);
	}
	
	public static void insertCart(ShoppingBean bean)throws Exception{
		sqlMapper.insert("teamGiga.bean.cart.insertCart", bean);
	}
public static List<ShoppingBean>selectshopping(int mbno)throws Exception{
	return sqlMapper.queryForList("teamGiga.bean.cart.selectshopping",mbno);
}
public static void delshopping(int mno)throws Exception{
	sqlMapper.delete("teamGiga.bean.cart.delshopping",mno);
}
	
}
